﻿using MvcApplication.Entity;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MvcApplication.Data.Mapping
{
    public class Role_Mapping : EntityTypeConfiguration<Role>
    {
        public Role_Mapping()
        {
            this.HasKey(t => t.ID);
            this.ToTable("Role");

            this.HasMany(t => t.RoleMenus).WithRequired().HasForeignKey(t => t.RoleID);
        }
    }
}
